home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / port / fcntl.h < prev    next >
C/C++ Source or Header  |  1996-07-10  |  1KB  |  54 lines

  1. /* k 0100    31/12/90    */
  2. /*    fcntl.h
  3.  
  4.     Define flag values accessible to open.
  5.  
  6.     Copyright (c) Borland International 1987,1988
  7.     All Rights Reserved.
  8. */
  9. #if __STDC__
  10. #define _Cdecl
  11. #else
  12. #define _Cdecl    cdecl
  13. #endif
  14.  
  15. extern int _Cdecl _fmode;
  16.  
  17. /* The first three can only be set by open */
  18.  
  19. #define O_RDONLY         1
  20. #define O_WRONLY         2
  21. #define O_RDWR             4
  22.  
  23. /* Flag values for open only */
  24.  
  25. #define O_CREAT        0x0100    /* create and open file */
  26. #define O_TRUNC        0x0200    /* open with truncation */
  27. #define O_EXCL        0x0400    /* exclusive open */
  28.  
  29. /* The "open flags" defined above are not needed after open, hence they
  30.    are re-used for other purposes when the file is running.  Sorry, its
  31.    getting crowded !
  32. */
  33. #define _O_RUNFLAGS    0x0700
  34. #define _O_EOF        0x0200 /* set when text file hits ^Z   */
  35.  
  36. /* a file in append mode may be written to only at its end.
  37. */
  38. #define O_APPEND    0x0800    /* to end of file */
  39.  
  40. /* MSDOS special bits */
  41.  
  42. #define O_CHANGED    0x1000    /* user may read these bits, but    */
  43. #define O_DEVICE    0x2000    /*   only RTL\io functions may touch.    */
  44. #define O_TEXT        0x4000    /* CR-LF translation    */
  45. #define O_BINARY    0x8000    /* no translation    */
  46.  
  47. /* DOS 3.x options */
  48.  
  49. #define O_NOINHERIT    0x80
  50. #define O_DENYALL    0x10
  51. #define O_DENYWRITE    0x20
  52. #define O_DENYREAD    0x30
  53. #define O_DENYNONE    0x40
  54. #define O_NDELAY        0x04                /* @0100 */